<div class="inmodal">
    <div class="modal-header">
        <h4 class="modal-title">{{operation | translate}}(ID:{{microgridevcharger.id}})</h4>
    </div>
    <div class="modal-body">
        <form role="form" name="form_microgridevcharger" novalidate class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-3 control-label">{{'MICROGRID.MICROGRID_EVCHARGER_NAME' | translate}}</label>
                <div class="col-sm-9"><input ng-model="microgridevcharger.name" type="text" name="microgridevchargername" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_microgridevcharger.microgridevchargername.$invalid && form_microgridevcharger.microgridevchargername.$dirty">
                        <small class="text-danger" ng-show="form_microgridevcharger.microgridevchargername.$error.required">{{'MICROGRID.INPUT_MICROGRID_EVCHARGER_NAME' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{{'MICROGRID.POWER_POINT' | translate}}</label>
                <div class="col-sm-9">
                    <ui-select ng-model="microgridevcharger.power_point.id" theme="bootstrap" required>
                        <ui-select-match allow-clear="false" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="point.id as point in points | filter: $select.search">
                            <div ng-bind-html="point.name | highlight: $select.search"></div>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{{'MICROGRID.METER' | translate}}</label>
                <div class="col-sm-9">
                    <ui-select ng-model="microgridevcharger.meter.id" theme="bootstrap" required>
                        <ui-select-match allow-clear="false" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="meter.id as meter in meters | filter: $select.search">
                            <div ng-bind-html="meter.name | highlight: $select.search"></div>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{{'MICROGRID.RATED_OUTPUT_POWER' | translate}}(kW)</label>
                <div class="col-sm-9"><input ng-model="microgridevcharger.rated_output_power" type="number" name="microgridevchargerrated_output_power" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_microgridevcharger.microgridevchargerrated_output_power.$invalid && form_microgridevcharger.microgridevchargerrated_output_power.$dirty">
                        <small class="text-danger" ng-show="form_microgridevcharger.microgridevchargerrated_output_power.$error.required">{{'MICROGRID.INPUT_CAPACITY' | translate}}</small>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" ng-click="cancel()">{{'SETTING.CANCEL' | translate}}</button>
        <button type="button" ng-disabled="form_microgridevcharger.$invalid" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
    </div>
</div>
